<?php

/**
 * This file is part of the Pagizer package.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @copyright   Copyright (c) 2010 Advisa (http://www.advisa.fr)
 * @author      Pagizer Core Team <team@pagizer.org>
 * @package     pagizer
 * @subpackage  backoffice
 */

class core_module_backoffice_Install001
{
    public function execute()
    {
        $dbProvider = f_database_Provider::getInstance();

        if(!$dbProvider->tableExists('f_temp'))
        {
            $script = file_get_contents(MODULES_DIR.DS.'backoffice'.DS.'sql'.DS.'f_temp.sql');
            $dbProvider->executeQuery($script);
        }

        if(!$dbProvider->tableExists('f_acl'))
        {
            $script = file_get_contents(MODULES_DIR.DS.'backoffice'.DS.'sql'.DS.'f_acl.sql');
            $dbProvider->executeQuery($script);
        }
    }
}